#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "DirectedRelationship.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Package;
class Profile;

/// <summary>
/// ProfileApplication
/// A profile application is used to show which profiles have been applied to a
/// package.
/// </summary>
class UMLMODEL_EXPORT ProfileApplication : public DirectedRelationship {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// appliedProfile getter
    /// References the Profiles that are applied to a Package through this
    /// ProfileApplication.
    /// </summary>
    shared_ptr<Profile> appliedProfile() const;

    /// <summary>
    /// appliedProfile setter
    /// References the Profiles that are applied to a Package through this
    /// ProfileApplication.
    /// </summary>
    void setAppliedProfile(shared_ptr<Profile> value);

    /// <summary>
    /// applyingPackage getter
    /// The package that owns the profile application.
    /// </summary>
    shared_ptr<Package> applyingPackage() const;

    /// <summary>
    /// applyingPackage setter
    /// The package that owns the profile application.
    /// </summary>
    void setApplyingPackage(shared_ptr<Package> value);

    /// <summary>
    /// isStrict getter
    /// Specifies that the Profile filtering rules for the metaclasses of the referenced
    /// metamodel shall be strictly applied.
    /// </summary>
    bool isStrict() const;

    /// <summary>
    /// isStrict setter
    /// Specifies that the Profile filtering rules for the metaclasses of the referenced
    /// metamodel shall be strictly applied.
    /// </summary>
    void setIsStrict(bool value);

private: // Fields
    /// <summary>
    /// appliedProfile
    /// References the Profiles that are applied to a Package through this
    /// ProfileApplication.
    /// </summary>
    shared_ptr<Profile> appliedProfile_;

    /// <summary>
    /// applyingPackage
    /// The package that owns the profile application.
    /// </summary>
    shared_ptr<Package> applyingPackage_;

    /// <summary>
    /// isStrict
    /// Specifies that the Profile filtering rules for the metaclasses of the referenced
    /// metamodel shall be strictly applied.
    /// </summary>
    const static bool isStrict_default_;
    bool isStrict_= isStrict_default_;

};

} // namespace uml
